package cn.myspringboot.article.mapper;

import cn.myspringboot.user.domain.Article;
import cn.myspringboot.user.domain.Bar;
import cn.myspringboot.user.domain.TypeNameCount;
import cn.myspringboot.user.domain.YearAndMonth;
import cn.myspringboot.user.query.ArticleQuery;

import java.util.List;

public interface ArticleMapper {
    void addArticle(Article article);
    void updateArticle(Article article);
    void deleteArticle(Long id);
    Article getArticleById(Long id);
    List<Article> getArticleAll();
    //文章表的分页查询
    List<Article> getArticleByPage(ArticleQuery articleQuery);
    void batchdelArticle(List<Long> ids);

    //首页显示文章内容查询
    List<Article> getPage(ArticleQuery articleQuery);

    List<TypeNameCount> findByTypeName();

    List<YearAndMonth> findByYearAndMonth();
    List<Bar> fingStarsAndNameByArticle();

}
